<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
class Entrie{

    private $id;
    private $title;
    private $text;
    private $is_published;

    private $user_id;
    private $categorie_id;
    

    public function  __construct($title, $text, $is_published, Categorie $categorie_id, User $user_id) {
        $this->title=$title;
        $this->text=$text;
        $this->is_published=$is_published;

        $this->categorie_id=$categorie_id;
        $this->user_id = $user_id;
        

        $this->id=1;
        
    }

    public function  __toString() {
        return $this->id.' - '.$this->title;
    }

    public function viewEntrie(){

        $return="";
        $return.= '<br>Title: '.$this->title;
        $return.= '<br>Text: '.$this->text;
        $return.= '<br>User: '.$this->user_id;
        $return.= '<br>Categorie: '.$this->categorie_id;

        return $return;

    }
    



}//end of class
?>
